<?php
include("class.phpmailer.php");

function mail_new($fun_to,$fun_subject,$fun_body,$fun_header,$fun_from,$fun_cc){
	$mail = new PHPMailer();

$mail->IsMail();

#	$mail->IsSMTP();                                      // set mailer to use SMTP
#	$mail->Host = "mail.eparinay.com";  // specify main and backup server
	//$mail->SMTPSecure = "ssl";                 // sets the prefix to the servier
#	$mail->SMTPAuth = true;     // turn on SMTP authentication
#	$mail->Username = "support@eparinay.com";  // SMTP username
#	$mail->Password = "Neha@123"; // SMTP password
#	$mail->Port       = 26;    



	$mail->From = $fun_from;
	$mail->FromName = "eparinay.com";
	$mail->AddAddress($fun_to);
	$mail->AddReplyTo($fun_from, $fun_from);

	if($fun_cc!=""){
		$mail->AddAddress($fun_cc);
	}
	$mail->WordWrap = 50;                                 // set word wrap to 50 characters
	//$mail->AddAttachment("/var/tmp/file.tar.gz");         // add attachments
	//$mail->AddAttachment("/tmp/image.jpg", "new.jpg");    // optional name
	$mail->IsHTML(true);                                  // set email format to HTML

	$mail->Subject = $fun_subject;
	$mail->Body    = $fun_body;
	//$mail->AltBody = "This is the body in plain text for non-HTML mail clients";

	if(!$mail->Send())
	{
	   echo "Message could not be sent. <p>";
	   echo "Mailer Error: " . $mail->ErrorInfo;
	   exit;
	}
}
?>
